<?php
/**
*	插件
*/
namespace Rainrock\Framework\kernel\core;


use Rainrock\Framework\kernel\db\DB;

class Chajian extends BaseClass{
	
	public static function getObj($name, $db=null)
	{
		$obj = Aock::getChajian($name);
		if($db != null)$obj->setDb($db);
		return $obj;
	}
	
	protected function initChajian() { }
	
	public function __construct()
	{
		$this->initChajian();
	}
	
	/**
	*	设置参数
	*/
	public function setConfig($arr)
	{
		foreach($arr as $k=>$v)$this->$k = $v;
		return $this;
	}
}